home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////////////
- //
- // StarView Include File (!)1996 Larry Monte/StarLab Systems Software
- //
- //
-
- ///////////////////////Terminology Explanations/////////////////////////////
- //
- // About un-commenting/commenting-out:
- // -----------------------------------
- //
- // When talking about commenting-out, it refers to disabling one of the
- // #defines below.
- // To comment out a #define, simply place "//" (without quotes) before
- // the #define.
- // To un-comment, remove the "//"'s (without quotes) which appear before
- // the #define.
- //
- ////////////////////////////////////////////////////////////////////////////
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Change the following to reflect the path where you put your STARVIEW files
- // Be sure to use double "\\"'s and include the trailing "\\"'s
-
- #define STARVIEW_PATH "C:\\MAX\\STARVIEW\\"
-
- ////////////////////////////////////////////////////////////////////////////
- // One of the following 2 defines must be uncommented. It determines the
- // type of operating system you are using. WIN95 users should define DOS..
- // Default is DOS
-
- #define DOS
- // #define OS2
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Leave these 2 defines alone....
-
- #define FF_OFFLINE 0x02
- #define this_task uitostr(id.task_num)
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // The following works in conjunction with the do_spec function. This #define
- // determines how many file specs will be searched within the archive. This
- // defines how many file specs will be searched for. (Default is 4: *.DOC,
- // *.TXT, *.PRN, and *.LST)
- // To define more, add one to the #define FILE_SPECS, below, and add the
- // specs[#] as instructed below.
-
- #define FILE_SPECS 5
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Leave this line alone...
-
- array [1..FILE_SPECS] of string: specs;
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // Function for searching file specs...
-
- int do_spec(string: fname)
- {
- int: i;
-
- /////////////////////////////////////////////////////////////////////////////
- //
- // To add more file specs, define them here (see example below)
- // NOTE: You do not need to worry about READ.ME files as they are searched
- // for by default!
- //
- specs[1] := ".DOC";
- specs[2] := ".TXT";
- specs[3] := ".PRN";
- specs[4] := ".LST";
- specs[5] := ".DIZ";
-
- // Example:
- //
- // specs[6] := ".EXM";
- //
- // By setting FILE_SPECS above to 5, you can then add the above statement to
- // search the archive for *.EXM files to be viewed online.
-
-
- for(i:=FILE_SPECS;i>0;i:=i-1)
- {
- if(strfind(fname,specs[i]) OR (strfind(fname,"READ") AND
- strfind(fname,"ME")))
- return 1;
-
- }
- return 0;
- }
-
- string longpadleft(long: i, int: len, int: ch)
- {
- string: itos;
- string: rc;
-
- itos:=ltostr(i);
-
- rc:=strpad("", len - strlen(itos), ch);
-
- return rc + itos;
- }
-
-